<?php if(isset($Error)){ echo $cargar->msj_error($Error); } if(isset($Exito)){ echo $cargar->msj_exito($Exito); }?>

<?=$cargar->hoja('center');?>
<div id="vista">

<?=$cargar->marcorojo('LISTADO DE VEHICULOS');?>

<?=$cargar->tabla(0,0,'center');?>
<tr align="right">
<td width="100%">
<? echo $cargar->link(' ',' <input type="button" value="&nbsp;+ NUEVO&nbsp;" />','/vehiculos/nuevo_vehiculo','listado');?>
</td>
</tr>

<tr>
	<td align='center'>

<? 
 	if(count($data)!=0)
	{
?>

<table border="1" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr align="center" bgcolor="#CCCCCC">
			 <td width="60px"><?  echo $cargar->font_2('Placa');?></td>
                <td ><?  echo $cargar->font_2('Serial Motor');?></td>
                <td width="80px"><?  echo $cargar->font_2('Serial Carroceria');?></td>
                <td width="80px"><?  echo $cargar->font_2('Marca');?></td>
                <td width="160px"><?  echo $cargar->font_2('Modelo');?></td>
                <td width="120px"><?  echo $cargar->font_2('Color');?></td>
                <th width='100px'><?  echo $cargar->font_2('Opciones');?></th>
 </tr>

<?
		for($i=0;$i< count($data);$i++)
		{
		if($i%2==0) $class="#FFFFFF";
		else $class="#F0F0F0";


echo '<tr bgcolor="'.$class.'">
<td align="left">&nbsp;'.$data[$i]['Vehiculo']['placa'].'</td>
<td align="left">&nbsp;'.$data[$i]['Vehiculo']['serial_motor'].'</td>
<td align="left">&nbsp;'.$data[$i]['Vehiculo']['serial_carroceria'].'</td>
<td align="left">&nbsp;'.$data[$i]['MarcaVehiculo']['nombre'].'</td>
<td align="left">&nbsp;'.$data[$i]['ModeloVehiculo']['nombre'].'</td>
<td align="left">&nbsp;'.$data[$i]['Vehiculo']['color'].'</td>
<td align="left">&nbsp;</td>
</tr>';


		}
	}
	else
{
		echo $cargar->tabla(0,0,'center');
echo '<tr align="center"> <td width="100%" colspan="3"><font color="red">No Existen Registros con esa Descripcion</font></td></tr>';
}
echo '</table>';
	
?>
	</td>
</tr>
<? if(count($data)>10) { ?>
<tr align="right">
<td width="100%">
<? echo $cargar->link(' ',' <input type="button" value="&nbsp;+ NUEVO&nbsp;" />','/vehiculos/nuevo_vehiculo','listado');?>
</td>
</tr>
<? } ?>
</table>
</fieldset>


</div>
<?=$cargar->hoja();?>

<div id="listado"></div>

<br /><br /><br />


























































<?php  /* if(isset($Error)){ echo $cargar->msj_error($Error); } if(isset($Exito)){ echo $cargar->msj_exito($Exito); } ?>
<div id="nuevo_vehi"></div>
<div id="listado_vehi">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr align="center">
	<td width="70px">


  	<?  echo $cargar->mca('LISTADO DE VEHICULOS'); //$cargar->AbrirMarco_1('LISTADO DE VEHICULOS');?>
  		<tr align="right">
  			<td width="100%">
		<?php echo $cargar->link(' ',' <input type="button" value="&nbsp;+ NUEVO VEHICULO&nbsp;" />','/vehiculos/nuevo_vehiculo','nuevo_vehi');?></td>
  		</tr>
  		</table>
		<table border="1" width="100%" cellpadding="0" cellspacing="0" align="center" class="table_res">
        <?php
		if(count($data)>0)
		{
			$i_edi = $html->image('png/editnotas.png', array('align'=>'absmiddle','alt' => 'Modificar', 'title' => 'Modificar Datos del Usuario', 'border'=>'0', 'width' => '20', 'height' => '20'));
			$i_bor =  $html->image('png/borrar.png', array('align'=>'absmiddle','alt' => 'Borrar', 'title' => 'Borrar Datos del Usuario', 'border'=>'0', 'width' => '20', 'height' => '20'));
			$i_des =  $html->image('png/desconectar.png', array('align'=>'absmiddle','alt' => 'Desconectar ', 'title' => 'Desconectar Usuario', 'border'=>'0', 'width' => '20', 'height' => '20'));
			$i_res =  $html->image('png/candado.png', array('align'=>'absmiddle','alt' => 'Desconectar ', 'title' => 'Restaurar Clave de acceso del Usuario', 'border'=>'0', 'width' => '20', 'height' => '20'));
		?>
            <tr align="center" bgcolor="#CCCCCC">
                <td width="60px"><?  echo $cargar->font_3('Placa');?></td>
                <td ><?  echo $cargar->font_2('Serial Motor');?></td>
                <td width="80px"><?  echo $cargar->font_2('Serial Carroceria');?></td>
                <td width="80px"><?  echo $cargar->font_2('Marca');?></td>
                <td width="160px"><?  echo $cargar->font_2('Modelo');?></td>
                <td width="120px"><?  echo $cargar->font_2('Color');?></td>
                <th width='100px'><?  echo $cargar->font_2('Opciones');?></th>
            </tr>
    	<?php
			for($i=0;$i< count($data);$i++)
			{
				if($i%2==0) $cl="vislistauno";
				else $cl="vislistados";
	?>			

<tr align="right" class="<?php echo $cl; ?>">
<td><?=$data[$i]['Vehiculo']['placa'];?></td>
<td><?=$data[$i]['Vehiculo']['serial_motor'];?></td>
<td><?=$data[$i]['Vehiculo']['serial_carroceria'];?></td>
<td><?=$data[$i]['MarcaVehiculo']['nombre'];?></td>
<td><?=$data[$i]['ModeloVehiculo']['nombre'];?></td>
<td><?=$data[$i]['Vehiculo']['color'];?></td>
<td>&nbsp;</td>
</tr>





<?
	}
		}
		else
		{
			echo "<tr><td align='center'><br /><font color='#FF0000'><b>No Posees Usuarios Registrados</b></font><br /><br /></td></tr>";
		}
		 ?>   
        </table>
       	<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
            <tr align="right">
                <td width="100%">
                <?php echo $cargar->link(' ',' <input type="button" value="&nbsp;+ NUEVO VEHICULO&nbsp;" />&nbsp;','/vehiculos/nuevo_vehiculo','nuevo_vehi');?>
                </td>
            </tr>
  		
  		<?  echo $cargar->CerrarMarco();?>
  	</td>
</tr> 
</table>
</fieldset>
<br /> <br /> <br /> <br />
</div>
*/ ?>

